//获取url参数的值
function getQueryVariable(variable) {
    var query = window.location.search.substring(1);  //取url的"?"部分 并截取"?"后的字符
    var vars = query.split("&");
    for (var i = 0; i < vars.length; i++) {
        var pair = vars[i].split("=");
        if (pair[0] == variable) {
            return pair[1];
        }
    }
    return (false);
}

function loadNav() {
    let nav = $("#nav");
    nav.empty();
    $.ajax({
        url: '/storeController/loadAssistList',
        data: null,
        async: false,
        type: 'get',
        contentType: 'application/json',
        success: function (resp) {
            if (resp.code == 0) {
                $.each(resp.data, function (index, item) {
                    nav.append("<dd><a onclick=\"window.location.href='/queryAssist?aName=" + item.name + "&kind=" + item.id
                        + "&account='+ getQueryVariable('account')\">" + item.name + "</a></dd>");
                });
            }
        }

    });
}
